package ee.greaton.kultuuriaken;

import java.io.Serializable;

import android.graphics.Bitmap;

public class Event implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8991828554464222296L;
	private String title, description, date, time, imgLink, location, category, ticketPrice, geoLat, geoLong, etime, ticketUrl;
	private transient Bitmap bitmap;
	
	public String getTitle() {
		return title;
	}
	
	public String getDescription() {
		return description;
	}
	
	public String getDate() {
		return date;
	}
	
	public String getTime() {
		return time;
	}
	
	public String getEtime() {
		return etime;
	}

	public String getImgLink() {
		return imgLink;
	}
	
	public String getLocation() {
		return location;
	}

	public String getCategory() {
		return category;
	}

	public String getTicketPrice() {
		return ticketPrice;
	}

	public String getGeoLat() {
		return geoLat;
	}
	
	public String getGeoLong() {
		return geoLong;
	}
	
	public String getTicketUrl() {
		return ticketUrl;
	}
	
	public Bitmap getBitmap(){
		return bitmap;
	}
	
	public void setBitmap(Bitmap bitmap){
		this.bitmap = bitmap;
	}
	
	public void setTicketUrl(String ticketUrl) {
		this.ticketUrl = ticketUrl;
	}
	
	public void setTitle(String title) {
		this.title = title;
	}
	
	public void setDescription(String description) {
		this.description = description;
	}
	
	public void setDate(String date) {
		this.date = date;
	}
	
	public void setTime(String time) {
		this.time = time;
	}
	
	public void setEtime(String etime) {
		this.etime = etime;
	}
	
	public void setImgLink(String imgLink) {
		this.imgLink = imgLink;
	}
	
	public void setLocation(String location) {
		this.location = location;
	}

	public void setCategory(String category) {
		this.category = category;
	}

	public void setTicketPrice(String ticketPrice) {
		this.ticketPrice = ticketPrice;
	}
	
	public void setGeoLat(String geoLat) {
		this.geoLat = geoLat;
	}
	
	public void setGeoLong(String geoLong) {
		this.geoLong = geoLong;
	}

	@Override
	public String toString() {
		return "Event [title=" + title + ", date=" + date + ", time=" + time
				+ "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((date == null) ? 0 : date.hashCode());
		result = prime * result
				+ ((description == null) ? 0 : description.hashCode());
		result = prime * result
				+ ((location == null) ? 0 : location.hashCode());
		result = prime * result + ((time == null) ? 0 : time.hashCode());
		result = prime * result + ((title == null) ? 0 : title.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj) {
			return true;
		}
		if (obj == null) {
			return false;
		}
		if (getClass() != obj.getClass()) {
			return false;
		}
		Event other = (Event) obj;
		if (date == null) {
			if (other.date != null) {
				return false;
			}
		} else if (!date.equals(other.date)) {
			return false;
		}
		if (description == null) {
			if (other.description != null) {
				return false;
			}
		} else if (!description.equals(other.description)) {
			return false;
		}
		if (location == null) {
			if (other.location != null) {
				return false;
			}
		} else if (!location.equals(other.location)) {
			return false;
		}
		if (time == null) {
			if (other.time != null) {
				return false;
			}
		} else if (!time.equals(other.time)) {
			return false;
		}
		if (title == null) {
			if (other.title != null) {
				return false;
			}
		} else if (!title.equals(other.title)) {
			return false;
		}
		return true;
	}
}
